﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using eBdb.EpubReader;

namespace Tester
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] files = Directory.GetFiles(@"E:\book\");
            Console.WriteLine("Started");
            foreach (var file in files)
            {
                try
                {
                    Epub epub = new Epub(file);
                    Console.WriteLine("==============" + epub.Title[0] + "==============");
                    foreach (NavPoint np in epub.TOC)
                    {
                        Console.WriteLine(np.Title);
                    }
                    Console.WriteLine("==============" + epub.Title[0] + "==============");
                }
                catch (Exception e)
                {
                    Console.WriteLine("FileName: " + file + ", Exception: " + e.Message);
                }
            }
            Console.WriteLine("Finished");
            Console.ReadLine();
        }
    }
}
